package com.yozinga.processor;

import org.json.JSONException;
import org.json.JSONObject;

import com.yozinga.entity.Category;

public class AboutYozingaProcessor {

	public Category getYozingaInfo(String response){
		Category aboutYozinga = new Category();
		try{
			JSONObject jsonObject = new JSONObject(response);
			aboutYozinga.setStreetAddress(jsonObject.getString("Address"));
			aboutYozinga.setPhoneNumber(jsonObject.getString("Phone"));
			aboutYozinga.setInfo(jsonObject.getString("Info"));
			aboutYozinga.setFaceBookUrl(jsonObject.getString("FacebookUrl"));
			aboutYozinga.setTwitterUrl(jsonObject.getString("TwitterUrl"));
			aboutYozinga.setVideoUrl(jsonObject.getString("VideoUrl"));
			aboutYozinga.setDrippleUrl(jsonObject.getString("DrippleUrl"));
		}catch(JSONException exception){
			exception.printStackTrace();
		}catch(Exception exception){
			exception.printStackTrace();
		}
		return aboutYozinga;
	}

}
